<template>
  <div class="xq4">
     <h3>评论</h3>
     <div class="xq4-1"  v-for="(v,i) in this.$store.getters.pinglun" :key="i">
        <div class="xq4-2">
            <van-image  round  width=".3rem" height=".3rem" src="https://img01.yzcdn.cn/vant/cat.jpeg"/>
            <div class="xq4-3">
                <p>{{v.h1}}</p>
                <p>{{v.h2}}</p>
                <p>{{v.h3}}</p>
            </div>
        </div>
        <van-icon name="like-o" />
     </div>
     <div class="pl1">
         <textarea name="" id="" cols="40rem" rows=".3rem" v-model="text">

         </textarea>
         <button @click="fun()">发送</button>
     </div>
  </div>
</template>

<script>
export default {
    data(){
        return{
            time:new Date(),
            text:""
        }
    },
    methods:{
        // fun(){
        //     this.$store.dispatch("link",{url:"/data/pinglun"})
        // }
    },
    computed:{
        gettime(){
            return this.time.toLocaleString();
        }
    },
    created(){
        this.$store.dispatch("linkpl",{url:"/data/pinglun"})
    },
}
</script>

<style scoped>
    .xq4{
        min-height: 3.8rem;
    }
    .xq4-1{
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: .2rem;
        font-size: .08rem;
    }
    .xq4-2{
        display: flex;
        align-items: center;
    }
    .xq4-3{
        margin-left: .2rem;   
    }
    .pl1{
        display: flex;
        margin-top: .3rem;
    }
</style>